﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using com.vs.DataAccess;
using com.vs.General;
using com.vs.General.RF;

namespace com.vs.RF.Web.inventory
{
    public partial class AdjustTypeEntry : RFDisplayPage
    {
        public DataTable dtAuth = null;

        protected void Page_Load(object sender, EventArgs e)
        {
            go();
        }

        protected override void initData()
        {
            DataHelper helper = null;
            //DataTable dtAuth = null;

            try
            {
                helper = new DataHelper(rfSess);
                dtAuth = helper.GetTable(CommandType.StoredProcedure, "ATH_RUserAuthList", new IDataParameter[]{
                    DataHelper.BuildParameter(rfSess, "@RECORD_TYPE", "ADJUSTMENT_TYPE"),
                    DataHelper.BuildParameter(rfSess, "@USER_ID", rfSess.User)});
                if (DataManager.IsEmpty(dtAuth))
                {
                    stErrorMessage = MessageManager.MSG_USR_007;//用户没有权限进行此操作
                    return;
                }
            }
            catch (Exception e)
            {
                ExceptionManager.LogException(rfSess, e);
                stErrorMessage = MessageManager.MSG_GEN_000 + e.Message;
            }
            finally
            {
                if (helper != null)
                    helper.Dispose();
            }
        }
    }
}
